@import '../../style/them.scss';
@import "../../style/iconfont";

.search-container {
  width: 100%;
  background: linear-gradient(to bottom, #cfcaf3, #ffffff);
  height: 8vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;

  .icon {
    line-height: 0;
  }

  input {
    box-sizing: border-box;
    background-color: #ffffff;
    width: 100%;
    height: 60rpx;
    margin: 40rpx 20rpx;
    border-radius: 50rpx;
    padding: 0 70rpx;
    z-index: 1;
    box-shadow: $shadow;
  }

  .cancel-search {
    margin-right: 10rpx;
    width: 100rpx;
    height: 60rpx;
    line-height: 60rpx;
    text-align: center;
    background: #8743c7;
    border-radius: 10rpx;
    font-size: 28rpx;
    color: white;

    &:active {
      opacity: 0.7;
    }
  }
}

.hot-list-container {
  .hot {
    margin: 20rpx 40rpx 40rpx 50rpx;
    font-size: 30rpx;
    letter-spacing: 4rpx;
    font-weight: bold;
    color: #f36a6a;
  }

  .food-hot-container {
    margin: auto 50rpx;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    width: 600rpx;
    height: 200rpx;

    .food-hot-list {
      margin: 0 10rpx;
      width: 120rpx;
      height: 60rpx;
      background: rgba(0, 0, 0, 0.05);
      color: #8743c7;
      border-radius: 30rpx;
      text-align: center;
      line-height: 60rpx;
      font-size: 28rpx;
      letter-spacing: 6rpx;
    }
  }
}

.food-result-container {
  box-sizing: border-box;
  width: 740rpx;
  margin: 0 5rpx;
  position: absolute;

  .data-list {
    box-shadow: $shadow;
    display: flex;
    margin: 14rpx 20rpx;
    padding: 10rpx 0;
    border-radius: 10rpx;

    .img {
      width: 100rpx;
      height: 100rpx;
      margin: 10rpx;

      image {
        width: 100%;
        height: 100%;
        border-radius: 50rpx;
      }
    }

    .tab-item {
      margin: 20rpx 6rpx;

      .calorie {
        color: $gray-text-color;
        margin-top: 6rpx;
        font-size: 24rpx;
      }
    }

    .icon {
      line-height: 120rpx;
      font-size: 28rpx;
      margin-left: 320rpx;
      color: $gray-text-color;
    }
  }
}

.data-container {
  .top-card {
    display: flex;
    align-items: center;
    height: 200rpx;
    margin: 20rpx;
    border-radius: 20rpx;
    box-shadow: $shadow;

    .default-container {
      width: 350rpx;
      height: 180rpx;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      border-right: 1rpx solid rgba(0, 0, 0, 0.1);

      .default-image {
        margin-top: 10rpx;
        width: 120rpx;
        height: 120rpx;
        box-shadow: $shadow;
        border-radius: 20rpx;
      }

      .food-name {
        font-size: 26rpx;
        margin-top: 6rpx;
      }
    }

    .selection-container {
      height: 180rpx;
      width: 350rpx;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;

      .select-img-container {
        position: relative;

        .add {

          display: flex;
          justify-content: center;
          align-items: center;
          font-size: 60rpx;
          width: 130rpx;
          height: 130rpx;
          box-shadow: $shadow;
          border-radius: 20rpx;
        }

        .selection-image {
          margin-top: 10rpx;
          width: 120rpx;
          height: 120rpx;
          box-shadow: $shadow;
          border-radius: 20rpx;
        }

        .cancelSelection {
          z-index: 1;
          display: flex;
          justify-content: center;
          align-items: center;
          background: rgba(0, 0, 0, 0.3);
          color: white;
          border-radius: 50%;
          width: 44rpx;
          height: 44rpx;
          line-height: 44rpx;
          position: absolute;
          right: -28rpx;
          top: -2rpx;
          font-size: 30rpx;

          &:active {
            opacity: 0.6;
          }
        }
      }

      .food-name {
        font-size: 26rpx;
        margin-top: 6rpx;
      }
    }
  }

  .data-container {
    width: 700rpx;
    margin: 20rpx;
    box-shadow: $shadow;
    border-radius: 20rpx;

    .title-card {
      margin: 40rpx 20rpx;
      height: 140rpx;

      .title {
        height: 80rpx;
        line-height: 90rpx;
        text-align: center;
        font-size: 40rpx;
        font-weight: bold;
        color: $gray-text-color;
      }

      .tips {
        text-align: center;
        font-size: 28rpx;
      }
    }

    .data-list {
      margin: 10rpx;
      width: 680rpx;

      .item {
        height: 130rpx;
        line-height: 130rpx;
        font-size: 30rpx;
        display: flex;
        justify-content: space-around;
        border-bottom: #dcdcdc solid 2rpx;

        .default-data {
          width: 200rpx;
          text-align: center;
        }

        .name {
          text-align: center;
          width: 200rpx;
          font-weight: bold;
        }

        .selection-data {
          text-align: center;
          width: 200rpx;
        }
      }
    }
  }
}
